<template>
  <a-empty
      :image=emptyUrl
      :image-style="{
      //   width: '110px',
      // height:'110px',
      //  marginTop: '10px'
    }"
  >
    <template #description>
      <span>
        {{info}}
      </span>
    </template>
    <a-button v-if="isExport" type="link" @click="clickBtn">点击上传</a-button>
  </a-empty>
</template>

<script setup>
import emptyUrl from '@/assets/images/empty.png'
import {defineProps, watch, ref, defineEmits} from "vue";
const emit = defineEmits(['exportBtn'])
const props = defineProps({
  descriptionInfo: {
    type: String,
    required: true,
    default: () => ''
  },
  isExport: {
    type: Boolean,
    default: () => false
  }
})
const info = ref(props.descriptionInfo)
watch(() => props.descriptionInfo, (newVal) => {
  console.log('那个数据为空', newVal)
  info.value = newVal
})
const clickBtn = () => {
  emit('exportBtn')
}

</script>

<style scoped>

</style>
